<template>
  <div class="subscribe">
    <Nav :activeNav="activeNav" :navList="navList" @clickNav="handleClickNav" />
    <InformationSub v-if="activeNav == 'zx'" />
    <EnterpriseSub v-if="activeNav == 'qy'" />
    <IndustrySub v-if="activeNav == 'rc'" />
  </div>
</template>
<script>
export default {
  data() {
    return {
      activeNav: "zx",
      navList: [
        {
          label: "资讯订阅",
          type: "zx",
        },
        {
          label: "企业订阅",
          type: "qy",
        },
        {
          label: "产业订阅",
          type: "rc",
        },
      ],
    };
  },
  methods: {
    handleClickNav(item) {
      this.activeNav = item.type;
    },
  },
  created() {
    //
  },
  mounted() {
    //
  },
  components: {
    Nav: () => import("../components/nav.vue"),
    InformationSub: () => import("../components/informationSub.vue"),
    EnterpriseSub: () => import("../components/enterpriseSub.vue"),
    IndustrySub: () => import("../components/industrySub.vue"),
  },
};
</script>
<style lang="scss" scoped>
.subscribe {
}
</style>
